<%@ Page Title="SEO" Language="C#" MasterPageFile="~/Views/Shared/Template.Master" Inherits="IWS.SiteManager.Web.Views.LayoutView<List<IWS.SiteManager.Core.Model.Setting>>" %>

<asp:Content ID="Content2" ContentPlaceHolderID="HeadContent" runat="server">
<script type="text/javascript">
	$().ready(function() {
		$("#GoogleWebmasterToolsVerifyTypeFile").change(function() {
			if ($(this).attr("checked") == true)
			{
				$("#GoogleWebmasterToolsValue").val('');
			}
		});
	});
</script>
</asp:Content>

<asp:Content ID="Content1" ContentPlaceHolderID="MainContent" runat="server">
<% var host = Model.FirstOrDefault(o => o.ID == IWS.SiteManager.Core.Constants.SiteHostname).Value; %>
	<div class="breadcrumb">
		<%=Html.ActionLink("Administration", "Index", "Manage") %> -&gt; SEO
	</div>
	
	<h2>Search Engine Optimization (SEO)</h2>
	
	<%using (Html.BeginForm("Seo", "Manage"))
	{ %>

	<h3>Sitemap XML</h3>
	<p>Setup your sitemap XML. Choose a filename for your sitemap.
	<br /><label for="sitemap">Sitemap filename:</label>
	<%=Html.TextBox("sitemap","sitemap.xml", new {maxlength=50,@class="textbox"} )%> <a href="#" onclick="javascript:$('#sitemap').val('sitemap.xml');">reset</a>
	</p>

	<h2>Third Party Tools</h2>

	<h3><a target="_blank" href="<%=String.Format("https://www.google.com/webmasters/tools/dashboard?hl=en&siteUrl=http%3A%2F%2F{0}%2F", host) %>">Google Webmaster Tools</a></h3>
	<p><%=Html.RadioButton("GoogleWebmasterToolsVerifyType", ((int)(IWS.SiteManager.Core.GoogleWebMasterType.MetaTag)).ToString(), Model.FirstOrDefault(o => o.ID == IWS.SiteManager.Core.Constants.GoogleWebMasterType).Value == ((int)(IWS.SiteManager.Core.GoogleWebMasterType.MetaTag)).ToString(), new { id = "GoogleWebmasterToolsVerifyTypeMeta" })%> <label for="GoogleWebmasterToolsVerifyTypeMeta">Meta Tag: </label>
	<br /><%=Html.RadioButton("GoogleWebmasterToolsVerifyType", ((int)(IWS.SiteManager.Core.GoogleWebMasterType.File)).ToString(), Model.FirstOrDefault(o => o.ID == IWS.SiteManager.Core.Constants.GoogleWebMasterType).Value == ((int)(IWS.SiteManager.Core.GoogleWebMasterType.File)).ToString(), new { id = "GoogleWebmasterToolsVerifyTypeFile" })%> <label for="GoogleWebmasterToolsVerifyTypeFile">File: </label>
	<br />(This can be the filename or the full meta tag google web master tools provides on their website when registering your site). 
	<br /><label for="GoogleWebmasterToolsValue">Value: </label><%=Html.TextBox("GoogleWebmasterToolsValue", Model.FirstOrDefault(o => o.ID == IWS.SiteManager.Core.Constants.GoogleWebMasterValue).Value, new { style="width: 80%;"})%> </p>	

	<h3><a target="_blank" href="http://www.google.com/analytics">Google Analytics</a></h3>
	<p>
		<label for="sitemap">Google Analytics ID:</label> <%=Html.TextBox("GoogleAnalyticsID", Model.FirstOrDefault(o=>o.ID == IWS.SiteManager.Core.Constants.GoogleAnalyticsID).Value) %>  UA-xxxxxxx-x
	</p>
	<p><input type="submit" value="Save" /></p>
	<%} %>
</asp:Content>
